<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<jsp:include page="head.jsp"></jsp:include>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"
	href="http://localhost:8080/cashback/static/css/form.css" />
<script type="text/javascript" src="http://localhost:8080/cashback/static/js/common.js"></script>
<title></title>
<script type="text/javascript">
	$(function() {
		var config = [ {
			moduleName : 'systemParam',
			descriptionName : '系统参数',
			height : 400,
			width : 800,
			layout : 'border',
			queryFields : [ {
				label : '名称:',
				type : 'text',
				name : 'name',
				otype:'S',/*对象类型*/
				rule:'ALLLIKES'/*默认是ALLLIKE*/
			}, {
				label : '值:',
				name : 'value',
				type : 'text',
				otype:'S',
				value : ''
			}, {
				label : '键:',
				otype:'S',
				name : 'paramKey',
				type : 'select',
				displayField : 'id',
				valueField : 'memo',
				nullPropertyName:'empty',
				mode:'remote',
				url:ZDS.CommonPage.requestContext+'loadPage.do?rows=100&page=1',
				root:'rows',
				store : [ {
					empty:true,
					id:'无',
					memo:''
				},{
					id : '男',
					memo : '1'
				}, {
					id : '女',
					memo : '0'
				} ]
			},{
				label:'出生日期:',
				name:'value',
				type:'date'
			}, ZDS.CommonPage.actions.queryAction ],
			formParams : {
				fields : [{
					type:'hidden',
					name:'id'
				}, {
					label : '名称',
					name : 'name',
					type : 'text',
					placeholder : '请输入名称'
				}, {
					label : '键:',
					type : 'text',
					name : 'paramKey',
					placeholder : '请输入键'
				}, {
					label : '值:',
					name : 'value',
					type : 'text',
					placeholder : '请输入该键的值'
				},{
					label:'爱好:',
					name:'check',
					type:'checkbox',
					displayField:'label',
					valueField:'value',
					store:[{
						label:'a',
						value:'1'
					},{
						label:'b',
						value:'2'
					}]
				} ,{
					label:'出生日期:',
					type:'date'
				},{
					label:'附件:',
					name:'attach',
					type:'multifile',
					id:'fjsc'
				},{
					label : '备注:',
					name : 'memo',
					type : 'textarea',
					rows : 5,
					cols : 10,
					placeholder : '请输入备注信息'
				} ],
				actions : [ ZDS.CommonPage.actions.saveFormAction,
						ZDS.CommonPage.actions.closeFormAction ]
			},
			gridParams : {
				maxHeight : 600,
				idField : 'id',
				columns : [ {
					field : 'id',
					title : '编号',
					check:true,
					width : 80
				}, {
					field : 'name',
					title : '名称',
					width : 120
				}, {
					field : 'paramKey',
					title : '键',
					width : 80,
					align : 'right'
				}, {
					field : 'value',
					title : '值',
					width : 80,
					align : 'right'
				} ],
				topBar : [ {
					urlKey : 'addAccount',
					text : '增加',
					iconCls : 'icon-add'
				}, {
					urlKey : 'updateAccount',
					text : '修改',
					iconCls : 'icon-edit'
				}, {
					urlKey : 'removeAccount',
					text : '删除',
					iconCls : 'icon-remove'
				}]
			}
		}];
		ZDS.CommonPage.saveUrlSuffix = '/save.do';
		ZDS.CommonPage.loadUrlSuffix = '/load.do';
		ZDS.CommonPage.loadPageUrlSuffix = '/loadPage.do';
		ZDS.CommonPage.removeUrlSuffix = '/remove.do';
		ZDS.CommonPage.requestContext = '${pageContext.request.contextPath}/admin/sysparam';	
		
		var page = ZDS.New(ZDS.CommonPage, config);
	});
</script>
</head>
<body>
</body>
</html>